<template>
  <div>子组件----{{ money }}</div>
  <button @click="btnClick">获取父传子数据</button>
</template>
<script setup>
const props = defineProps({
  money: {
    type: Number,
    required: true
  }
})
const emits = defineEmits(['setMoney'])
const btnClick = () => {
  //   props.money--
  //   console.log(props.money)
  emits('setMoney', 1)
}
</script>
